#ifndef MJPG_H
#define MJPG_H

#include <QWidget>
#include <QApplication>
#include <QLabel>
#include <QVBoxLayout>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QImage>
#include <QPixmap>
#include <QTimer>
#include <QUrl>
#include <QDebug>
#include <QDateTime>
#include "globalval.h"
namespace Ui {
class mjpg;
}

class mjpg : public QWidget
{
    Q_OBJECT

public:
    explicit mjpg(QWidget *parent = 0);
    ~mjpg();
public slots:
//     void processFrame();
//     void replyFinished();
     void updateTime();
     void startStream();
     void onNetworkReply(QNetworkReply *reply);

private:
    Ui::mjpg *ui;

    QNetworkAccessManager *networkManager;
    QNetworkReply *reply;

    QByteArray m_buffer;
};

#endif // MJPG_H
